<?php

class Application_Model_service_PhieuDatHangService implements Application_Model_serviceInf_PhieuDatHangServiceInf {
	protected $_name = "tb_phieudathang";
	protected static $_instance = null;
	
	public static function getInstance() {
		if (self::$_instance == null) {
			self::$_instance = new self ();
		}
		return self::$_instance;
	}
	/**
	 * 
	 */
	public function getAllPhieuDatHang() {
		$phieuDatHangDAO = Application_Model_dataDAO_PhieuDatHangDAO::getInstance ();
		$phieuDatHangDAO instanceof Application_Model_dataDAO_PhieuDatHangDAO;
		$result = $phieuDatHangDAO->getAllPhieuDatHang ();
		return $result;
	}
	
	/**
	 * @param unknown_type $idPhieuDatHang
	 */
	public function getPhieuDatHang($idPhieuDatHang) {
		$phieuDatHangDAO = Application_Model_dataDAO_PhieuDatHangDAO::getInstance ();
		$phieuDatHangDAO instanceof Application_Model_dataDAO_PhieuDatHangDAO;
		$result = $phieuDatHangDAO->getPhieuDatHang ( $idPhieuDatHang );
		return $result;
	}
	/**
	 * @param unknown_type $idTaiKhoan
	 */
	public function getAllPhieuHang($idTaiKhoan) {
		$phieuDatHangDAO = Application_Model_dataDAO_PhieuDatHangDAO::getInstance ();
		$phieuDatHangDAO instanceof Application_Model_dataDAO_PhieuDatHangDAO;
		$result = $phieuDatHangDAO->getAllPhieuHang ( $idTaiKhoan );
		return $result;
	}
	/**
	 * @param unknown_type $idPhieuDatHang
	 * @param unknown_type $trangThai
	 */
	public function capNhatTrangThaiPhieuDatHang($idPhieuDatHang, $trangThai) {
		$phieuDatHangDAO = Application_Model_dataDAO_PhieuDatHangDAO::getInstance ();
		$phieuDatHangDAO instanceof Application_Model_dataDAO_PhieuDatHangDAO;
		$result = $phieuDatHangDAO->capNhatTrangThaiPhieuDatHang ( $idPhieuDatHang, $trangThai );
		return $result;
	}
	/**
	 * @param unknown_type $idPhieuDatHang
	 */
	public function huyPhieuDatHang($idPhieuDatHang) {
		$phieuDatHangDAO = Application_Model_dataDAO_PhieuDatHangDAO::getInstance ();
		$phieuDatHangDAO instanceof Application_Model_dataDAO_PhieuDatHangDAO;
		$result = $phieuDatHangDAO->huyPhieuDatHang ( $idPhieuDatHang );
		return $result;
	}
	/**
	 * 
	 */
	public function getAllPhieuDatHangHuy() {
		$phieuDatHangDAO = Application_Model_dataDAO_PhieuDatHangDAO::getInstance ();
		$phieuDatHangDAO instanceof Application_Model_dataDAO_PhieuDatHangDAO;
		$result = $phieuDatHangDAO->getAllPhieuDatHangHuy ();
		return $result;
	}
	/**
	 * @param unknown_type $idPhieuDatHang
	 */
	public function phucHoiPhieuDatHang($idPhieuDatHang) {
		$phieuDatHangDAO = Application_Model_dataDAO_PhieuDatHangDAO::getInstance ();
		$phieuDatHangDAO instanceof Application_Model_dataDAO_PhieuDatHangDAO;
		$result = $phieuDatHangDAO->phucHoiPhieuDatHang ( $idPhieuDatHang );
		return $result;
	}
	/**
	 * @param unknown_type $noiDungTimKiem
	 * @param unknown_type $tieuChiTimKiem
	 */
	public function timKiemPhieuDatHang($noiDungTimKiem, $tieuChiTimKiem) {
		$phieuDatHangDAO = Application_Model_dataDAO_PhieuDatHangDAO::getInstance ();
		$phieuDatHangDAO instanceof Application_Model_dataDAO_PhieuDatHangDAO;
		$result = $phieuDatHangDAO->timKiemPhieuDatHang ( $noiDungTimKiem, $tieuChiTimKiem );
		return $result;
	}
	/**
	 * @param unknown_type $phieuDatHang
	 */
	public function themPhieuDatHang($giaTri, $ngayTao, $trangThai, $biHuyHayChua, $maKhachHang, $maTaiKhoan) {
		$phieuDatHangDAO = Application_Model_dataDAO_PhieuDatHangDAO::getInstance ();
		$phieuDatHangDAO instanceof Application_Model_dataDAO_PhieuDatHangDAO;
		$result = $phieuDatHangDAO->themPhieuDatHang ( $giaTri, $ngayTao, $trangThai, $biHuyHayChua, $maKhachHang, $maTaiKhoan );
		return $result;
	}
	
	/**
	 * @param unknown_type $giaTri
	 * @param unknown_type $ngayTao
	 * @param unknown_type $trangThai
	 * @param unknown_type $biHuyHayChua
	 * @param unknown_type $maKhachHang
	 * @param unknown_type $maTaiKhoan
	 */
	public function suaPhieuDatHang($idPhieuDatHang, $giaTri, $ngayTao, $trangThai, $biHuyHayChua, $maKhachHang, $maTaiKhoan) {
		$phieuDatHangDAO = Application_Model_dataDAO_PhieuDatHangDAO::getInstance ();
		$phieuDatHangDAO instanceof Application_Model_dataDAO_PhieuDatHangDAO;
		$result = $phieuDatHangDAO->suaPhieuDatHang ( $idPhieuDatHang, $giaTri, $ngayTao, $trangThai, $biHuyHayChua, $maKhachHang, $maTaiKhoan );
		return $result;
	}
/**
	 * 
	 */
	public function getAllPhieuDatHangChuaXuLy() {
		$phieuDatHangDAO = Application_Model_dataDAO_PhieuDatHangDAO::getInstance ();
		$phieuDatHangDAO instanceof Application_Model_dataDAO_PhieuDatHangDAO;
		$result = $phieuDatHangDAO->getAllPhieuDatHangChuaXuLy();
		return $result;
	}

/**
	 * 
	 */
	public function getAllPhieuDatHangDaXuLy() {
		$phieuDatHangDAO = Application_Model_dataDAO_PhieuDatHangDAO::getInstance ();
		$phieuDatHangDAO instanceof Application_Model_dataDAO_PhieuDatHangDAO;
		$result = $phieuDatHangDAO->getAllPhieuDatHangDaXuLy();
		return $result;
	}


}

?>